package dapps.entity.monitor;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "servicepredi")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Servicepredi {

	private static final long serialVersionUID = -172749047563230864L;

	public Servicepredi() {

	}
	
	@Id
	@Column(nullable=false,unique=true)
	private Long mainid;
	
	private Integer envilm;
	private Integer envim;
	private Integer envis;
	private Integer enviy;
	
	private Integer govlm;
	private Integer govm;
	private Integer govs;
	private Integer govy;
	
	private Integer managlm;
	private Integer managm;
	private Integer manags;
	private Integer managy;
	
	private Integer marketlm;
	private Integer marketm;
	private Integer markets;
	private Integer markety;
	
	private Integer pricelm;
	private Integer pricem;
	private Integer prices;
	private Integer pricey;
	
	private Integer costslm;
	private Integer costsm;
	private Integer costss;
	private Integer costsy;
	
	private Integer taxlm;
	private Integer taxm;
	private Integer taxs;
	private Integer taxy;
	
	private Integer competitivelm;
	private Integer competitivem;
	private Integer competitives;
	private Integer competitivey;
	
	private Integer fundlm;
	private Integer fundm;
	
	private Integer oillm;
	private Integer oilm;
	
	private Integer laborlm;
	private Integer laborm;
	
	private Integer mincomem;	
	private Integer mincomes;	
	private Integer mincomey;	
	
	private Integer investm;	
	private Integer invests;	
	private Integer investy;
	
	private Integer maincostm;	
	private Integer maincosts;	
	private Integer maincosty;
	
	private Integer profitm;	
	private Integer profits;	
	private Integer profity;

	private String profitfactor;// 9 == other
	private String profitother;

	private String salefactor;
	private String saleother;

	private String costfactor;
	private String costother;

	private String investhzfactor;
	private String investhzother;

	private Integer fundshortfactor;
	private String fundshortother;
	
	private Integer laborshortfactor;
	private String laborshortother;
	
	private Integer policyresult;
	private Integer policyreason;
	private String policyother;
	
	
	
	public Long getMainid() {
		return mainid;
	}

	public void setMainid(Long mainid) {
		this.mainid = mainid;
	}

	public Integer getEnvilm() {
		return envilm;
	}

	public void setEnvilm(Integer envilm) {
		this.envilm = envilm;
	}

	public Integer getEnvim() {
		return envim;
	}

	public void setEnvim(Integer envim) {
		this.envim = envim;
	}

	public Integer getEnvis() {
		return envis;
	}

	public void setEnvis(Integer envis) {
		this.envis = envis;
	}

	public Integer getGovlm() {
		return govlm;
	}

	public void setGovlm(Integer govlm) {
		this.govlm = govlm;
	}

	public Integer getGovm() {
		return govm;
	}

	public void setGovm(Integer govm) {
		this.govm = govm;
	}

	public Integer getGovs() {
		return govs;
	}

	public void setGovs(Integer govs) {
		this.govs = govs;
	}

	public Integer getManaglm() {
		return managlm;
	}

	public void setManaglm(Integer managlm) {
		this.managlm = managlm;
	}

	public Integer getManagm() {
		return managm;
	}

	public void setManagm(Integer managm) {
		this.managm = managm;
	}

	public Integer getManags() {
		return manags;
	}

	public void setManags(Integer manags) {
		this.manags = manags;
	}

	public Integer getMarketlm() {
		return marketlm;
	}

	public void setMarketlm(Integer marketlm) {
		this.marketlm = marketlm;
	}

	public Integer getMarketm() {
		return marketm;
	}

	public void setMarketm(Integer marketm) {
		this.marketm = marketm;
	}

	public Integer getMarkets() {
		return markets;
	}

	public void setMarkets(Integer markets) {
		this.markets = markets;
	}

	public Integer getPricelm() {
		return pricelm;
	}

	public void setPricelm(Integer pricelm) {
		this.pricelm = pricelm;
	}

	public Integer getPricem() {
		return pricem;
	}

	public void setPricem(Integer pricem) {
		this.pricem = pricem;
	}

	public Integer getPrices() {
		return prices;
	}

	public void setPrices(Integer prices) {
		this.prices = prices;
	}

	public Integer getCostslm() {
		return costslm;
	}

	public void setCostslm(Integer costslm) {
		this.costslm = costslm;
	}

	public Integer getCostsm() {
		return costsm;
	}

	public void setCostsm(Integer costsm) {
		this.costsm = costsm;
	}

	public Integer getCostss() {
		return costss;
	}

	public void setCostss(Integer costss) {
		this.costss = costss;
	}

	public Integer getTaxlm() {
		return taxlm;
	}

	public void setTaxlm(Integer taxlm) {
		this.taxlm = taxlm;
	}

	public Integer getTaxm() {
		return taxm;
	}

	public void setTaxm(Integer taxm) {
		this.taxm = taxm;
	}

	public Integer getTaxs() {
		return taxs;
	}

	public void setTaxs(Integer taxs) {
		this.taxs = taxs;
	}

	public Integer getMincomem() {
		return mincomem;
	}

	public void setMincomem(Integer mincomem) {
		this.mincomem = mincomem;
	}

	public Integer getMincomes() {
		return mincomes;
	}

	public void setMincomes(Integer mincomes) {
		this.mincomes = mincomes;
	}

	public Integer getMincomey() {
		return mincomey;
	}

	public void setMincomey(Integer mincomey) {
		this.mincomey = mincomey;
	}

	public Integer getInvestm() {
		return investm;
	}

	public void setInvestm(Integer investm) {
		this.investm = investm;
	}

	public Integer getInvests() {
		return invests;
	}

	public void setInvests(Integer invests) {
		this.invests = invests;
	}

	public Integer getInvesty() {
		return investy;
	}

	public void setInvesty(Integer investy) {
		this.investy = investy;
	}

	public Integer getMaincostm() {
		return maincostm;
	}

	public void setMaincostm(Integer maincostm) {
		this.maincostm = maincostm;
	}

	public Integer getMaincosts() {
		return maincosts;
	}

	public void setMaincosts(Integer maincosts) {
		this.maincosts = maincosts;
	}

	public Integer getMaincosty() {
		return maincosty;
	}

	public void setMaincosty(Integer maincosty) {
		this.maincosty = maincosty;
	}

	public Integer getProfitm() {
		return profitm;
	}

	public void setProfitm(Integer profitm) {
		this.profitm = profitm;
	}

	public Integer getProfits() {
		return profits;
	}

	public void setProfits(Integer profits) {
		this.profits = profits;
	}

	public Integer getProfity() {
		return profity;
	}

	public void setProfity(Integer profity) {
		this.profity = profity;
	}

	public String getProfitfactor() {
		return profitfactor;
	}

	public void setProfitfactor(String profitfactor) {
		this.profitfactor = profitfactor;
	}

	public String getProfitother() {
		return profitother;
	}

	public void setProfitother(String profitother) {
		this.profitother = profitother;
	}

	public String getSalefactor() {
		return salefactor;
	}

	public void setSalefactor(String salefactor) {
		this.salefactor = salefactor;
	}

	public String getSaleother() {
		return saleother;
	}

	public void setSaleother(String saleother) {
		this.saleother = saleother;
	}

	public String getCostfactor() {
		return costfactor;
	}

	public void setCostfactor(String costfactor) {
		this.costfactor = costfactor;
	}

	public String getCostother() {
		return costother;
	}

	public void setCostother(String costother) {
		this.costother = costother;
	}

	public String getInvesthzfactor() {
		return investhzfactor;
	}

	public void setInvesthzfactor(String investhzfactor) {
		this.investhzfactor = investhzfactor;
	}

	public String getInvesthzother() {
		return investhzother;
	}

	public void setInvesthzother(String investhzother) {
		this.investhzother = investhzother;
	}

	public Integer getPolicyresult() {
		return policyresult;
	}

	public void setPolicyresult(Integer policyresult) {
		this.policyresult = policyresult;
	}

	public Integer getPolicyreason() {
		return policyreason;
	}

	public void setPolicyreason(Integer policyreason) {
		this.policyreason = policyreason;
	}

	public String getPolicyother() {
		return policyother;
	}

	public void setPolicyother(String policyother) {
		this.policyother = policyother;
	}

	public Integer getEnviy() {
		return enviy;
	}

	public void setEnviy(Integer enviy) {
		this.enviy = enviy;
	}

	public Integer getGovy() {
		return govy;
	}

	public void setGovy(Integer govy) {
		this.govy = govy;
	}

	public Integer getManagy() {
		return managy;
	}

	public void setManagy(Integer managy) {
		this.managy = managy;
	}

	public Integer getMarkety() {
		return markety;
	}

	public void setMarkety(Integer markety) {
		this.markety = markety;
	}

	public Integer getPricey() {
		return pricey;
	}

	public void setPricey(Integer pricey) {
		this.pricey = pricey;
	}

	public Integer getCostsy() {
		return costsy;
	}

	public void setCostsy(Integer costsy) {
		this.costsy = costsy;
	}

	public Integer getTaxy() {
		return taxy;
	}

	public void setTaxy(Integer taxy) {
		this.taxy = taxy;
	}

	public Integer getCompetitivelm() {
		return competitivelm;
	}

	public void setCompetitivelm(Integer competitivelm) {
		this.competitivelm = competitivelm;
	}

	public Integer getCompetitivem() {
		return competitivem;
	}

	public void setCompetitivem(Integer competitivem) {
		this.competitivem = competitivem;
	}

	public Integer getCompetitives() {
		return competitives;
	}

	public void setCompetitives(Integer competitives) {
		this.competitives = competitives;
	}

	public Integer getCompetitivey() {
		return competitivey;
	}

	public void setCompetitivey(Integer competitivey) {
		this.competitivey = competitivey;
	}

	public Integer getFundlm() {
		return fundlm;
	}

	public void setFundlm(Integer fundlm) {
		this.fundlm = fundlm;
	}

	public Integer getFundm() {
		return fundm;
	}

	public void setFundm(Integer fundm) {
		this.fundm = fundm;
	}

	public Integer getOillm() {
		return oillm;
	}

	public void setOillm(Integer oillm) {
		this.oillm = oillm;
	}

	public Integer getOilm() {
		return oilm;
	}

	public void setOilm(Integer oilm) {
		this.oilm = oilm;
	}

	public Integer getLaborlm() {
		return laborlm;
	}

	public void setLaborlm(Integer laborlm) {
		this.laborlm = laborlm;
	}

	public Integer getLaborm() {
		return laborm;
	}

	public void setLaborm(Integer laborm) {
		this.laborm = laborm;
	}
	
	

	public Integer getFundshortfactor() {
		return fundshortfactor;
	}

	public void setFundshortfactor(Integer fundshortfactor) {
		this.fundshortfactor = fundshortfactor;
	}

	public Integer getLaborshortfactor() {
		return laborshortfactor;
	}

	public void setLaborshortfactor(Integer laborshortfactor) {
		this.laborshortfactor = laborshortfactor;
	}

	public String getFundshortother() {
		return fundshortother;
	}

	public void setFundshortother(String fundshortother) {
		this.fundshortother = fundshortother;
	}


	public String getLaborshortother() {
		return laborshortother;
	}

	public void setLaborshortother(String laborshortother) {
		this.laborshortother = laborshortother;
	}

	@Transient
	public List<String[]> getFields(){
		String[] fieldstr1 = {"3",//3个选项
							 "envilm","envim","envis","enviy",
							 "govlm","govm","govs","govy",
							 "managlm","managm","manags","managy",
							 "competitivelm","competitivem","competitives","competitivey",
							 "marketlm","marketm","markets","markety",
							 "pricelm","pricem","prices","pricey",
							 "costslm","costsm","costss","costsy",
							 "taxlm","taxm","taxs","taxy",
							 "fundlm","fundm",
							 "oillm","oilm",
							 "laborlm","laborm",
							 "policyresult"};
		String[] fieldstr2 = {"6","mincomem","mincomes","mincomey","investm","invests","investy",
							 "maincostm","maincosts","maincosty","profitm","profits","profity","policyreason"};
		String[] fieldstr3 = {"0","profitfactor","salefactor","costfactor","investhzfactor","fundshortfactor","laborshortfactor"};//first 0 means string
		List<String[]> ls = new ArrayList<String[]> ();
		ls.add(fieldstr1);ls.add(fieldstr2);ls.add(fieldstr3);
		return ls;
		
	}
	
	@Override
	public String toString() {
		return this.getMainid().toString();
	}

}
